#include "TokenBoolExp.h"
#include <iostream>
#include <string>
using namespace std;
int main()
{
	string s;
	while(getline(cin, s))
	{
		TokenBoolExp tbe(s);
		cout << tbe.getResult() << endl;
	}
	return 0;
}

